import { get } from "./api.js";

//获取山西证券近一年k线数据
export const shanxi = () => {
  return new Promise((resolve, reject) => {
    get(
      `/stock/quote/v1/historyv1?endtime=${Date.now()}&inst=002500&limit=-360&market=SZ&servicetype=KLINEB&starttime=0&resptype=JSON&period=DAY`
    ).then((res) => {
      resolve(res);
    });
  });
};

//获取东方证券近一年k线数据
export const dongfang = () => {
  return new Promise((resolve, reject) => {
    get(
      `/stock/quote/v1/historyv1?endtime=${Date.now()}&inst=600958&limit=-360&market=SH&servicetype=KLINEB&starttime=0&resptype=JSON&period=DAY`
    ).then((res) => {
      resolve(res);
    });
  });
};
